﻿using System;
using System.ServiceModel;

namespace BlueWind.Mediator.ServiceContracts.Interfaces
{
    [ServiceContract(CallbackContract = typeof(IColleague))]
    public interface IMediatorPrototypeManager
    {
        [OperationContract]
        void Add(IMediator prototye, String name);

        [OperationContract()]
        bool CheckMediatorExist(String from, String to);

        [OperationContract(IsOneWay = true)]
        void CreateNewMediator(String from, String to);

        int GetCount();

        [OperationContract]
        String GetMediatorKey(String from, String to);

        [OperationContract(IsOneWay = true)]
        void RegisterToExistMediator(String userName, String mediatorName);

        [OperationContract]
        void Remove(String key);

        [OperationContract(IsOneWay = true)]
        void Send(String from, String room, BwMessage message, MessageType messageType);

        [OperationContract]
        void UnRegisterToExistMediator(String mediatorName, String UserName);

        [OperationContract(Name = "Register", IsOneWay = true)]
        void Register(string from, string to);

        [OperationContract(Name = "RegisterClassroom", IsOneWay = true)]
        void Register(string from, string room, Boolean isClassroom);
    }
}